package org.example;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;
import java.util.concurrent.TimeUnit;

/**
 * @author shenguangyang
 */
@RestController
public class TestController {

    @GetMapping("/test/{time}")
    public String test(@PathVariable(value = "time") Integer time) throws InterruptedException {
        TimeUnit.SECONDS.sleep(time);
        return UUID.randomUUID().toString();
    }
}
